1 // Josh Parmenter (2007)
4 SynthDef(\scratch, {arg gate = 1, buffer;
7 Env([0,1,0], [0.1, 0.1], \sin, 1),
9 speed = MouseX.kr(-10, 10);
10 speed = speed - DelayN.kr(speed, 0.1, 0.1);
11 speed = MouseButton.kr(1, 0, 0.3) + speed ;
12 buf = PlayBuf.ar(1, buffer, speed * BufRateScale.kr(buffer), loop: 1);
13 Out.ar(0, (buf * env).dup );
18 // path to a mono soundfile here
19 a = Buffer.read(s, "sounds/a11wlk01.wav");
21 b = Synth(\scratch, [\buffer, a]);
23 // move mouse to scrub the record.
24 // press mouse button to 'stop the record', you can scrub while it is stopped.